//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.lyq.bean.service;

import com.lyq.bean.Manager;
import com.lyq.bean.mySql.AddM_Sql;
import com.lyq.bean.mySql.RemoveM_Sql;
import com.lyq.bean.mySql.SeekAllM_Sql;
import com.lyq.bean.mySql.SeekExist_Sql;
import com.lyq.bean.mySql.UpdatepwdSql;
import java.util.List;

public class M_Service {
    public M_Service() {
    }

    public Boolean add_M(String name, String pwd) {
        Boolean bool = (new SeekExist_Sql()).seekExist_Sql(name, "管理员");
        if (bool) {
            bool = false;
        } else {
            bool = (new AddM_Sql()).addM_Sql(name, pwd);
        }

        return bool;
    }

    public Boolean remove_M(String name) {
        Boolean bool = (new RemoveM_Sql()).removeM_Sql(name);
        return bool;
    }

    public List<Manager> seekAll_M(List<Manager> list) {
        List<Manager> lt = (new SeekAllM_Sql()).seekAllM_Sql(list);
        return lt;
    }

    public String getUpdatePwd(String Usersort, String Username, String Pwd) {
        UpdatepwdSql ups = new UpdatepwdSql();
        String bool = ups.updatesql(Usersort, Username, Pwd);
        return bool;
    }
}